//
//  TodayContentModel.m
//  EveryDayNews
//
//  Created by 徐继垚 on 14/11/29.
//  Copyright (c) 2014年 徐继垚. All rights reserved.
//

#import "TodayContentModel.h"

@implementation TodayContentModel
+(void)getDataWithBlock:(myblock)block myid:(NSString *)myid
{
    NSMutableArray * array = [NSMutableArray array];
    AFHTTPNetGetData * data = [[AFHTTPNetGetData alloc]init];
    [data getDataURL:[NSString stringWithFormat:@"http://news-at.zhihu.com/api/3/story/%@", myid] parameters:nil block:^(id result) {
        
        TodayContentModel * model = [[TodayContentModel alloc]init];
        model.body = [result objectForKey:@"body"];
        model.image_source = [result objectForKey:@"image_source"];
        model.title = [result objectForKey:@"title"];
        model.aimage = [result objectForKey:@"image"];
        NSArray * arr = [result objectForKey:@"css"];
        model.css = arr[0];
        [array addObject:model];
   
        block(array);

    }];
     
    
     
    

}
@end
